﻿using System;
using System.Collections.Generic;
using System.Xml;
using System.Xml.Xsl;

using umbraco;

namespace CreativeMinds.Umbraco.Dictionary2JS {

	public static class SnippetRenderer {

		public static string Render(XmlDocument data, string template, int languageId, string culture) {
			XslCompiledTransform xslt = macro.getXslt(template);

			Dictionary<string, object> parameters = new Dictionary<string,object>();
			parameters.Add("LanguageId", languageId);
			parameters.Add("Culture", culture);
			//parameters.Add("Dic2JSExtension", new Dic2JSExtension());
			
			return macro.GetXsltTransformResult(data, xslt, parameters);
		}
	}
}